import {
  createRouter,
  createWebHashHistory
} from 'vue-router';
// 1. 定义路由组件， 注意，这里一定要使用 文件的全名（包含文件后缀名）
// import Main from "../src/components/main.vue";
// import Main1 from "../src/components/main1.vue";

const routes = [{
    path: "/",
    name: "main",
    component: () => import('../components/main.vue'),
  },
  {
    path: "/main1",
    name: "main1",
    component: () => import('../components/main1.vue'),
  },
  {
    path: "/main3",
    name: "main3",
    component: () => import('../components/main3.vue'),
  },
  {
    path: "/skeleton",
    name: "skeleton",
    component: () => import('../components/skeleton.vue'),
  },
];


// Vue-router新版本中，需要使用createRouter来创建路由
const router = createRouter({
  // 指定路由的模式,此处使用的是hash模式
  history: createWebHashHistory(),
  routes // short for `routes: routes`
})
export default router;